package com.lokyiu.tutorial.java.exerisce1;

import java.util.ArrayList;
import java.util.List;

public class GetCountry {
	public static void main(String[] args){
		
		Dist np = new Dist("North Point","7SisterStreet",60000);
		Dist wc = new Dist("Wan Chai","Computer Center",50000);
		Dist cent = new Dist("Central","IFC",30000);
		Dist tst = new Dist("Tsim Sha Tsui","Star Road",40000);
		Dist kt = new Dist("Kowloon Tong","Railway Station",30000);
		Dist KT = new Dist("Kwun Tong","Industrial District",80000);
		
		Dist a = new Dist("a Name","landmark a",550000);
		Dist b = new Dist("b Name","landmark b",500000);
		Dist c = new Dist("c Name","landmark c",300000);
		Dist d = new Dist("d Name","landmark d",450000);
		Dist e = new Dist("e Name","landmark e",310000);
		Dist f = new Dist("f Name","landmark f",1800000);
		
		List<Dist> hkDist = new ArrayList<Dist>();
		
		hkDist.add(np);
		hkDist.add(wc);
		hkDist.add(cent);
		hkDist.add(tst);
		hkDist.add(kt);
		hkDist.add(KT);
		
		City hk = new City("Hong Kong",hkDist);
		
		List<Dist> shDist = new ArrayList<Dist>();
		shDist.add(a);
		shDist.add(b);
		shDist.add(c);
		shDist.add(d);
		shDist.add(e);
		shDist.add(f);
		
		
		
		City sh = new City("ShangHai",shDist);
		
		List<City> cities = new ArrayList<City>();
		cities.add(hk);
		cities.add(sh);
		
		Country china = new Country("China",cities);

		System.out.println("Population of " + china.getName() + " : " +china.getPopulation());
		System.out.println("includes "+ cities.size() +" cities as below :" );
		for(City city : cities){
			System.out.println(city.getName() + " population :" + city.getPopulation());

		}
	}
}
